home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / share / doc / libtask-weaken-perl / README < prev   
Encoding:
Text File  |  2009-06-12  |  2.4 KB  |  64 lines

  1. NAME
  2.     Task::Weaken - Ensure that a platform has weaken support
  3.  
  4. DESCRIPTION
  5.     One recurring problem in modules that use Scalar::Util's "weaken"
  6.     function is that it is not present in the pure-perl variant.
  7.  
  8.     While this isn't necesarily always a problem in a straight CPAN-based
  9.     Perl environment, some operating system distributions only include the
  10.     pure-Perl versions, don't include the XS version, and so weaken is then
  11.     "missing" from the platform, despite passing a dependency on
  12.     Scalar::Util successfully.
  13.  
  14.     Most notably this is RedHat Linux at time of writing, but other come and
  15.     go and do the same thing, hence "recurring problem".
  16.  
  17.     The normal solution is to manually write tests in each distribution to
  18.     ensure that "weaken" is available.
  19.  
  20.     This restores the functionality testing to a dependency you do once in
  21.     your Makefile.PL, rather than something you have to write extra tests
  22.     for each time you write a module.
  23.  
  24.     It should also help make the package auto-generators for the various
  25.     operating systems play more nicely, because it introduces a dependency
  26.     that they have to have a proper weaken in order to work.
  27.  
  28.   How this Task works
  29.     Part of the problem seems to stem from the fact that some distributions
  30.     continue to include modules even if they fail some of their tests.
  31.  
  32.     To get around that for this module, it will do a few dirty tricks.
  33.  
  34.     If Scalar::Util is not available at all, it will issue a normal
  35.     dependency on the module. However, if Scalar::Util is relatively new (
  36.     it is >= 1.19 ) and the module does not have weaken, the install will
  37.     bail out altogether with a long error encouraging the user to seek
  38.     support from their vendor (this problem happens most often in
  39.     vendor-packaged Perl versions).
  40.  
  41.     This distribution also contains tests to ensure that weaken is available
  42.     using more normal methods.
  43.  
  44.     So if your module uses "weaken", you can just add the following to your
  45.     Module::Install-based Makefile.PL (or equivalent).
  46.  
  47.       requires 'Task::Weaken' => 0;
  48.  
  49. AUTHOR
  50.     Adam Kennedy <adamk@cpan.org>, <http://ali.as/>
  51.  
  52. SEE ALSO
  53.     Task, Scalar::Util, <http://ali.as/>
  54.  
  55. COPYRIGHT
  56.     Copyright 2006 - 2009 Adam Kennedy.
  57.  
  58.     This program is free software; you can redistribute it and/or modify it
  59.     under the same terms as Perl itself.
  60.  
  61.     The full text of the license can be found in the LICENSE file included
  62.     with this module.
  63.  
  64.